package com.xinqi.modules.course.course.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.course.course.dto.rsp.CourseResultDTO;
import com.xinqi.modules.course.course.factory.RemoteCourseFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 课程服务
 *
 * @Author：yyzhen
 * @Package：com.xinqi.modules.course.course.course.client
 * @Project：xingqiclass-cloud-plus
 * @name：RemoteCourseClient
 * @Date：2023/3/10 11:27
 * @Filename：RemoteCourseClient
 */
@FeignClient(contextId = "remoteCourseClient", value = ServiceNameConstants.XQ_COURSE, fallbackFactory = RemoteCourseFallbackFactory.class)
public interface RemoteCourseClient {

    /**
     * 获取课程信息
     * @return
     */
    @GetMapping("/inner/course/findCourse")
    R<CourseResultDTO> findCourse(@RequestParam(value = "courseId") Long courseId);

    /**
     * 账号注销（课程板块变动）
     *
     * @return
     */
    @PostMapping("/inner/course/accountCancel")
    R<Boolean> accountCancel(@RequestParam(value = "userId") Long userId);

    /**
     * 注册老师初始化 熟悉新奇
     * @return
     */
    @GetMapping("/inner/demonstrate/init")
    R<Boolean> initDemonstrate(@RequestParam(value = "userId") Long userId);


}
